import request from '@/utils/request'

// const prePath = "/";
//收货列表-自定义
export function provinceReceivingOrder(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder/customizeList/page',
    method: 'post',
    data,
  })
}
//收货选择配送单-自定义
export function selectDeliverOrder(data) {
  return request({
    url: '/provinceDeliver/deliverOrder/customizeList/page',
    method: 'post',
    data,
  })
}
//收货明细页-列表-自定义
export function provinceReceivingOrderDetail(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrderDetail/customizeList/page',
    method: 'post',
    data,
  })
}
//收货 新增 保存
export function saveProvinceReceivingOrder(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder/save',
    method: 'post',
    data,
  })
}
export function saveProvinceReceivingOrderAndSave(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder/saveAndSubmit',
    method: 'post',
    data,
  })
}
//收货 提交
export function submitProvinceReceivingOrder(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder/submit',
    method: 'post',
    data,
  })
}
//收货 删除
export function deleteProvinceReceivingOrder(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder',
    method: 'delete',
    data,
  })
}
// 收货 详情 两个接口
export function modifyProvinceReceivingOrder(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrderDetail/customizeList/all',
    method: 'post',
    data,
  })
}
export function detailsProvinceReceivingOrder(id) {
  return request({
    url: '/provincePlatform/provinceReceivingOrder/' + id,
    method: 'get',
  })
}
// 收货明细 分组
export function groupsProvinceReceivingOrderDetail(data) {
  return request({
    url: '/provincePlatform/provinceReceivingOrderDetail/customizeGroups',
    method: 'post',
    data,
  })
}

// 退货
//退货列表-自定义
export function provinceReturnOrder(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrder/customizeList/page',
    method: 'post',
    data,
  })
}
//退货明细页-列表-自定义
export function provinceReturnOrderDetail(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrderDetail/customizeList/page',
    method: 'post',
    data,
  })
}
//退货 新增 保存
export function saveProvinceReturnOrder(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrder/save',
    method: 'post',
    data,
  })
}
export function saveProvinceReturnOrderAndSave(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrder/saveAndSubmit',
    method: 'post',
    data,
  })
}
//退货 提交
export function submitProvinceReturnOrder(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrder/submit',
    method: 'post',
    data,
  })
}
//退货 删除
export function deleteProvinceReturnOrder(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrder',
    method: 'delete',
    data,
  })
}
// 退货 详情 两个接口
export function modifyProvinceReturnOrder(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrderDetail/customizeList/all',
    method: 'post',
    data,
  })
}
export function detailsProvinceReturnOrder(id) {
  return request({
    url: '/provincePlatform/provinceReturnOrder/' + id,
    method: 'get',
  })
}
// 退货明细 分组
export function groupsProvinceReturnOrderDetail(data) {
  return request({
    url: '/provincePlatform/provinceReturnOrderDetail/customizeGroups',
    method: 'post',
    data,
  })
}
//采购
//订单页接口
export function getProvincePurchOrderCustomizeListPage(data) {
  return request({
    url: '/provincePurch/purchOrder/customizeList/page',
    method: 'post',
    data,
  })
}
//明细页接口
export function getProvincePurchOrderDetailCustomizeListPage(data) {
  return request({
    url: '/provincePurch/purchOrderDetail/customizeList/page',
    method: 'post',
    data,
  })
}
export function getProvincePurchOrderDetailCustomizeListAll(data) {
  return request({
    url: '/provincePurch/purchOrderDetail/customizeList/all',
    method: 'post',
    data,
  })
}
export function getProvincePurchOrderDetailExtCustomizeListAll(data) {
  return request({
    url: '/provincePurch/purchOrderDetailExt/customizeList/all',
    method: 'post',
    data,
  })
}
export function createProvincePurchOrder(data) {
  return request({
    url: '/provincePurch/purchOrder',
    method: 'post',
    data,
  })
}
export function createProvincePurchOrderAndSave(data) {
  return request({
    url: '/provincePurch/purchOrder/saveAndSubmit',
    method: 'post',
    data,
  })
}
export function getProvincePurchOrderById(id) {
  return request({
    url: '/provincePurch/purchOrder/' + id,
    method: 'get',
  })
}
export function updateProvincePurchOrder(data) {
  return request({
    url: '/provincePurch/purchOrder',
    method: 'put',
    data,
  })
}
export function sumbitProvincePurchOrder(data) {
  return request({
    url: '/provincePurch/purchOrder/submit',
    method: 'post',
    data,
  })
}
export function deleteProvincePurchOrder(data) {
  return request({
    url: '/provincePurch/purchOrder',
    method: 'delete',
    data,
  })
}
export function excelProvincePurchOrderDetailCustomizeList(data) {
  return request({
    url: `/provincePurch/purchOrderDetail/excelList`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
export function excelDetailProvincePurchOrder(data) {
  return request({
    url: `/provincePurch/purchOrder/excelDetail`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
export function getProvincePurchOrderDetailCustomizeGroups(data) {
  return request({
    url: '/provincePurch/purchOrderDetail/customizeGroups',
    method: 'post',
    data,
  })
}
//省采配送
export function getProvinceDeliverOrderCustomizePage(data) {
  return request({
    url: '/provinceDeliver/deliverOrder/customizeList/page',
    method: 'post',
    data,
  })
}
export function updateDataProvinceDeliverOrder(data) {
  return request({
    url: '/provinceDeliver/deliverOrder/updateData',
    method: 'post',
    data,
  })
}
export function getProvinceProductSupplierInfoPage(params) {
  return request({
    url: '/province/provinceProductSupplierInfo/page',
    method: 'get',
    params,
  })
}
export function pullDataProvinceProductSupplierInfo(data) {
  return request({
    url: '/province/provinceProductSupplierInfo/pullData',
    method: 'post',
    data,
  })
}
export function excelProvinceProductSupplierInfo(data) {
  return request({
    url: `/province/provinceProductSupplierInfo/excelList`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
//省采待支付订单列表
export function pendPayOrderDetailPage(data) {
  return request({
    url: '/province/pendPayOrderDetail/customizeList/page',
    method: 'post',
    data,
  })
}
//省采待支付订单列表更新数据
export function updateDataPendPayOrderDetail(data) {
  return request({
    url: '/province/pendPayOrderDetail/updateData',
    method: 'post',
    data,
  })
}
//省采支付订单列表
export function provincePayOrderCustomizeListPage(data) {
  return request({
    url: '/province/payOrder/customizeList/page',
    method: 'post',
    data,
  })
}
//省采支付订单明细
export function provincePayOrderDetailCustomizeListPage(data) {
  return request({
    url: '/province/payOrderDetail/customizeList/page',
    method: 'post',
    data,
  })
}
//省采支付订单明细
export function provincePayOrderDetailCustomizeListAll(data) {
  return request({
    url: '/province/payOrderDetail/customizeList/all',
    method: 'post',
    data,
  })
}
//省采支付订单明细
export function provincePayOrderDetailCustomizeGroup(data) {
  return request({
    url: '/province/payOrderDetail/customizeGroups',
    method: 'post',
    data,
  })
}
//省采支付订单提交
export function provincePayOrderSubmit(data) {
  return request({
    url: '/province/payOrder/submit',
    method: 'post',
    data,
  })
}
//省采支付订单byId
export function provincePayOrderById(id) {
  return request({
    url: '/province/payOrder/' + id,
    method: 'get',
  })
}
//省采支付订单删除
export function provincePayOrderRemove(data) {
  return request({
    url: '/province/payOrder',
    method: 'delete',
    data,
  })
}
//省采支付订单创建
export function createProvincePayOrder(data) {
  return request({
    url: '/province/payOrder',
    method: 'post',
    data,
  })
}
export function createProvincePayOrderAndSave(data) {
  return request({
    url: '/province/payOrder/saveAndSubmit',
    method: 'post',
    data,
  })
}
//省采支付订单修改
export function updateProvincePayOrder(data) {
  return request({
    url: '/province/payOrder',
    method: 'put',
    data,
  })
}
//省采支付订单明细导出
export function excelProvincePayOrderDetailExcelList(data) {
  return request({
    url: `/province/payOrderDetail/excelList`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}
//省采支付订单详情导出
export function excelDetailProvincePayOrder(data) {
  return request({
    url: `/province/payOrder/excelDetail`,
    method: 'post',
    data,
    responseType: 'blob',
  })
}

export function getProvinceProductLastSupplierInfoPage(params) {
  return request({
    url: '/province/provinceProductSupplierInfo/getLastSupplierInfo',
    method: 'get',
    params,
  })
}
export function getProvinceProductSupplierInfoAll(params) {
  return request({
    url: '/province/provinceProductSupplierInfo/all',
    method: 'get',
    params,
  })
}
export function getProvinceProductSupplierInfoBid(id) {
  return request({
    url: '/province/provinceProductSupplierInfo/' + id,
    method: 'get',
  })
}
